﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Ball_G : Generator
{
    public int MaxQuantity=8;
    static public int Presented = 0;
    protected override void Start()
    {
        Presented = 0;
        base.Start();
    }
    public override void Generate()
    {
        if (Presented < MaxQuantity)
        {
            base.Generate();
            Presented++;
        }
    }
    //protected void Generate_Ball()
    //{
    //    Generate();
    //}
    private void FixedUpdate()
    {
        //Debug.Log("Presented: " + Presented);
        if (Presented == 0)
        {
            SceneManager.LoadScene("FailedScene");
        }
    }
}
